home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8769 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Fractals
  5. Date: 6 Mar 1996 01:34:17 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4hjm6pINN44r@keats.ugrad.cs.ubc.ca>
  8. References: <4hhv43$49i@sunburst.ccs.yorku.ca> <4hibr0INN7s1@gambier.ugrad.cs.ubc.ca> <313D1AF1.4A22@hsc.unt.edu>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <313D1AF1.4A22@hsc.unt.edu>,
  12. Steve Fogoros  <sfogoros@hsc.unt.edu> wrote:
  13.  >Kazimir Kylheku wrote:
  14.  >> 
  15.  >> In article <4hhv43$49i@sunburst.ccs.yorku.ca>,
  16.  >> Naftali Sturm <yu114405@yorku.ca> wrote:
  17.  >> >How do you program fractals in C?
  18.  >> 
  19.  >> You define a data type that can hold complex numbers. You can make it an
  20.  >> abstract data type if you wish.
  21.  >> 
  22.  >> Then you define some basic operations: complex multiplication, addition,
  23.  >> norm and so forth.
  24.  >> 
  25.  >> Then you compute the fractal using whatever iterative formula you wish, such as
  26.  >> 
  27.  >>         z = z^2 + C
  28.  >
  29.  >When you used the ^ symbol, did you intend to indicate 2 as an exponent of z or bitwise exclusive or?
  30.  
  31. Exponent, sorry. That was not intended to be a C statement. (And in fact it
  32. could not be, since C does not let you overload operators to support a complex
  33. type that way). 
  34.  
  35. By the way, what would be the meaning of doing an XOR between a floating point
  36. complex number and 2?
  37. -- 
  38.  
  39.